
<!--填写支付信息界面-->

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>订单确认</title>
<link rel="short icon" href="images/tc.png" />
<link rel="stylesheet" type="text/css" href="css/Confirmation_of_order.css">
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/Confirmation_of_order.js"></script>
	<link rel="stylesheet" type="text/css" href="easyui/css/easyui.css">
	<link rel="stylesheet" type="text/css" href="easyui/css/icon.css">
	<link rel="stylesheet" type="text/css" href="easyui/css/demo.css">
	<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
	<script type="text/javascript" src="easyui/js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="easyui/js/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="js/model.js"></script>
	
<script>
	$(function(){
		 $.post("jdInfoServlet?t="+new Date(),{op:"JdPayInfomations"},function(data){
				var str1=""; //景点名
		 		var str2=""; //同城价
		 		
				$.each(data.rows,function(index,items){
					if(index==0){
						str1=items;
					}
					
					if(index==1){
						str2=items;
					}
					
	    		});
	    		
	    		$("#jdName").html(str1);
	    		$("#jdname").html(str1);
	    		$(".pricess").html(str2);
	    		
	    },"json");   
		
		getUserLoginInfos();
		
	});
	
	function pay(){
	     var jdNames=$("#jdName").html(); //获取景点名
		 var jdPrices=$(".pricess").html();  //获取价格
		 var odate=$('#tuan_sdate').datebox('getValue');  //获取游玩时间
		 var num=$('#ss').val(); //获取购买数量
		 var unames=$(".login").html(); //获取当前用户名
		 var person=$("#coo_person_information_bottom_person").val(); //获取取票人
		 var tel=$("#coo_person_information_bottom_tel").val();  //获取手机号码
		 var coo_phone=$(".coo_phone").html();
		 var coo_names=$(".coo_names").html();
		 
		 if(odate==""){
		 	alert("请选择游玩日期....");
		 	return;
		 }
		 
		 if(person==""){
		 	alert("用户名不能为空...");
		 	return;
		 }
		 
		 if(tel==""){
		 	alert("手机号码不能为空");
		 	return;
		 }
		 
		 if(coo_names!="填写成功"){
		 	alert("用户名填写错误，请重新输入");
		 	return;
		 }
		 
		 if(coo_phone!="填写成功"){
		 	alert("手机号码填写错误，请重新输入");
		 	return;
		 }
		
	 	 var oyears=parseInt(odate.substring(0,4));  //获取输入时间的年份
		 var omonth=parseInt(odate.substring(5,7)); //获取输入时间的月份
		 var odates=parseInt(odate.substring(8,10)); //获取输入时间的日期
		 
		 var d=new Date(); //获取系统时间
		 var syears=d.getFullYear();  //获取系统时间的年份
		 var smonth=d.getMonth()+1; //获取系统时间的月份
		 var sdate=d.getDate(); //获取系统时间的日期
		 
		 if(oyears>=syears  &&  omonth>=smonth  &&  odates>=sdate ){  //选择的日期的判定
		 	$.post("jdInfoServlet?t=s"+new Date(),{op:"JdPayFors",jdNames:jdNames,jdPrices:jdPrices,odate:odate,num:num,unames:unames},function(data){
				$.each(data.rows,function(index,items){
					window.location.href="Checkstand.html";
				});
		 	},"json");
		 }else{
		 	alert("日期有误，请重新选择...");
		 	return;
		 }
	 
	}
	
</script>
</head>

<body>
<!--总框架-->
<div id="coo_mydiv">
    <!--头部框开始-->
    <div id="coo_head">
        <div class="coo_head_left">
        	<img src="images/com_logo_01.png"/>
        </div>
        <div class="coo_head_right">
        	<ul id="userInfoShow">
            	
            </ul>
        </div>
    </div> 
    <!--头部框结束-->
    
    <!--信息部分开始-->
    <div id="coo_content">
        <div class="coo_content_s">
        	<ul>
            	<li class="coo_content_s1">1.填写订单信息</li>
                <li class="coo_content_s2">2.预定成功</li>
            </ul>
        </div>
    </div> 
    <!--信息部分结束-->
    
    <!--填写支付信息部分开始-->
    <div id="coo_pay_information">
        <div class="coo_pay_information_1">
        	<h1 class="coo_pay_information_2_p1" style="font-size:20px"><span style="font-size:	30px;border-bottom:2px solid #2a98da" id="jdName"></span></h1>
            <br>
        </div>
        <div style="background: red;position:absolute;display:none;" class="pricesss">1223</div>
        <!--名称及预定信息部分开始-->
       	<div class="coo_pay_information_2">
       	
       	 
        	<h1 class="coo_pay_information_2_p1" style="font-size:20px">名称：<span style="font-size:20px" id="jdname"></span>成人票</h1><br>
           
    
            <h1 class="coo_pay_information_2_p2" style="font-size:20px">预定信息:</h1><br/>
            
              <br>
                <div class="bookOrderDetails">
  <div id="odate">游玩日期：</div>

<input name="sdate" id="tuan_sdate" class="easyui-datebox"  style="width:90px" /> 
</div>
            
             <br>
  <div class="bookOrderDetails">
  <div id="pri_num">门票数量：</div>

    <input id="ss" class="easyui-numberspinner" style="width:45px;"    data-options="min:1,max:100" onpropertychange="Change();" /> 
   
</div>            
            
         
        </div>
        <!--名称及预定信息部分结束-->
        
        
        <div class="coo_pay_information_3">
        
  <label class="coo_pay_information_2_p4" style="font-size:20px">费用小计：</label><span class="coo_pay_information_3_money">￥<span class="pricess"></span></span>
       
        </div>
       
    </div>  
        
 
    <!--填写支付信息部分结束-->
    
     <!--填写取票人信息部分开始-->
    <div id="coo_person_information">
        <div class="coo_person_information_top">
        <div class="infos">
        <h1 class="peo_infos" style="height:30px">
        <span class="bottomLineName">取票人信息</span>
        </h1>
        </div>
        </div>
        <div class="coo_person_information_bottom">
        	<p style="font-size:16px;margin-left:10px;">&nbsp;&nbsp;&nbsp;&nbsp;取票人：<input type="text" id="coo_person_information_bottom_person" name="coo_person_information_bottom_person"/><span class="coo_names"></span></p>
            <p style="font-size:16px;margin-left:12px">手机号码：<input type="text" id="coo_person_information_bottom_tel" name="coo_person_information_bottom_tel"/><span class="coo_phone"></span></p>
        </div>
    </div> 
    <!--填写取票人信息部分结束-->
    
     <!--订单总价部分开始-->
    <div id="coo_num_money">
        <p class="orderPrice">订单总价:<span class="coo_num_money_sum" id="jdAPrice">￥<span class="pricess"></span></span></p>
        <button class="coo_num_money_button" onclick="pay()">去支付</button></div>
    </div> 
    <!--订单总价部分结束-->
     
     <!--尾部开始-->
    <div id="footer_lite">
Copyright © 
<span class="cr_time" type="Sence">2002-2015</span>
 版权所有 
<span class="corp_name">同程网络科技股份有限公司</span>
<a class="icp_num" target="_blank" href="http://img1.40017.cn/cn/new_ui/public/images/20141103174615.jpg">苏ICP证B2-20100204</a>
</div> 
     <!--尾部结束-->

<!--结束-->
</body>
</html>
